package com.juneyao.bigdata.service.impl;


import com.juneyao.bigdata.domain.ResultParam;
import com.juneyao.bigdata.service.SetLogicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;


/**
 * @author quanbiao
 * @date 2018-06-29
 * 集合生成实现类
 */
@Service("setLogicService")
public class SetLogicServiceImpl implements SetLogicService {

    @Autowired
    private RestTemplate restTemplate;

    @Value("${url_send}")
    private String url_send;

    @Override
    public ResultParam insertCrowdLogic(String jsonStr) {

        new Thread(new Runnable() {
            @Override
            public void run() {
                SetLogicTreatmentServiceImpl slts = new SetLogicTreatmentServiceImpl();
                slts.setJsonTreatment(jsonStr, restTemplate, url_send);
            }
        }).start();

        return ResultParam.ok();
    }





}
